home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / AIncludes / TextServices.a < prev    next >
Encoding:
Text File  |  1996-01-24  |  16.6 KB  |  689 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        TextServices.a
  3. ;
  4. ;    Contains:    Text Services Manager Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Package:    Universal Interfaces 2.2 in “MPW” on ETO #20
  8. ;
  9. ;    Copyright:    © 1984-1995 by Apple Computer, Inc.
  10. ;                All rights reserved.
  11. ;
  12. ;    Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13. ;                stack.  Include the file and version information (from above)
  14. ;                in the problem description and send to:
  15. ;                    Internet:    apple.bugs@applelink.apple.com
  16. ;                    AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.  
  20.     IF &TYPE('__TEXTSERVICES__') = 'UNDEFINED' THEN
  21. __TEXTSERVICES__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  25.     include 'Types.a'
  26.     ENDIF
  27. ;        include 'ConditionalMacros.a'                                ;
  28.  
  29.     IF &TYPE('__EVENTS__') = 'UNDEFINED' THEN
  30.     include 'Events.a'
  31.     ENDIF
  32. ;        include 'Quickdraw.a'                                        ;
  33. ;            include 'MixedMode.a'                                    ;
  34. ;            include 'QuickdrawText.a'                                ;
  35. ;        include 'OSUtils.a'                                        ;
  36. ;            include 'Memory.a'                                        ;
  37.  
  38.     IF &TYPE('__MENUS__') = 'UNDEFINED' THEN
  39.     include 'Menus.a'
  40.     ENDIF
  41.  
  42.     IF &TYPE('__APPLEEVENTS__') = 'UNDEFINED' THEN
  43.     include 'AppleEvents.a'
  44.     ENDIF
  45. ;        include 'Errors.a'                                            ;
  46. ;        include 'EPPC.a'                                            ;
  47. ;            include 'AppleTalk.a'                                    ;
  48. ;            include 'Files.a'                                        ;
  49. ;                include 'Finder.a'                                    ;
  50. ;            include 'PPCToolbox.a'                                    ;
  51. ;            include 'Processes.a'                                    ;
  52. ;        include 'Notification.a'                                    ;
  53.  
  54.     IF &TYPE('__ERRORS__') = 'UNDEFINED' THEN
  55.     include 'Errors.a'
  56.     ENDIF
  57.  
  58.     IF &TYPE('__COMPONENTS__') = 'UNDEFINED' THEN
  59.     include 'Components.a'
  60.     ENDIF
  61.  
  62. kTSMVersion                        EQU        $200                ; Version of the Text Services Manager is 2.0  
  63. kTextService                    EQU        'tsvc'                ; component type for the component description 
  64. kInputMethodService                EQU        'inpm'                ; component subtype for the component description 
  65. ; Component Flags in ComponentDescription 
  66. bTakeActiveEvent                EQU        15                    ; bit set if the component takes active event 
  67. bHandleAERecording                EQU        16                    ; bit set if the component takes care of recording Apple Events <new in vers2.0> 
  68. bScriptMask                        EQU        $00007F00            ; bit 8 - 14 
  69. bLanguageMask                    EQU        $000000FF            ; bit 0 - 7  
  70. bScriptLanguageMask                EQU        bScriptMask + bLanguageMask ; bit 0 - 14  
  71.  
  72. ; Hilite styles 
  73. kCaretPosition                    EQU        1                    ; specify caret position 
  74. kRawText                        EQU        2                    ; specify range of raw text 
  75. kSelectedRawText                EQU        3                    ; specify range of selected raw text 
  76. kConvertedText                    EQU        4                    ; specify range of converted text 
  77. kSelectedConvertedText            EQU        5                    ; specify range of selected converted text 
  78.  
  79. ; Apple Event constants 
  80. ; Event class 
  81. kTextServiceClass                EQU        kTextService
  82. ; event ID 
  83. kUpdateActiveInputArea            EQU        'updt'                ; update the active Inline area 
  84. kPos2Offset                        EQU        'p2st'                ; converting global coordinates to char position 
  85. kOffset2Pos                        EQU        'st2p'                ; converting char position to global coordinates 
  86. kShowHideInputWindow            EQU        'shiw'                ; show or hide the input window 
  87. ; Event keywords 
  88. keyAETSMDocumentRefcon            EQU        'refc'                ; TSM document refcon, typeLongInteger 
  89. ; Note: keyAETSMScriptTag, keyAERequestedType, keyAETSMTextFont, keyAETextPointSize
  90. ;    typeAEText, typeIntlWritingCode, typeQDPoint, and keyAEAngle have been moved to 
  91. ;    AERegistry.h 
  92. keyAEServerInstance                EQU        'srvi'                ; component instance 
  93. keyAETheData                    EQU        'kdat'                ; typeText 
  94. keyAEFixLength                    EQU        'fixl'                ; fix len ?? 
  95. keyAEHiliteRange                EQU        'hrng'                ; hilite range array 
  96. keyAEUpdateRange                EQU        'udng'                ; update range array 
  97. keyAEClauseOffsets                EQU        'clau'                ; Clause Offsets array 
  98. keyAECurrentPoint                EQU        'cpos'                ; current point 
  99. keyAEDragging                    EQU        'bool'                ; dragging falg 
  100. keyAEOffset                        EQU        'ofst'                ; offset 
  101. keyAERegionClass                EQU        'rgnc'                ; region class 
  102. keyAEPoint                        EQU        'gpos'                ; current point 
  103. keyAEBufferSize                    EQU        'buff'                ; buffer size to get the text 
  104. keyAEMoveView                    EQU        'mvvw'                ; move view flag 
  105. keyAELength                        EQU        'leng'                ; length 
  106. keyAENextBody                    EQU        'nxbd'                ; next or previous body 
  107. ; optional keywords for Offset2Pos (Info about the active input area) 
  108. keyAETextLineHeight                EQU        'ktlh'                ; typeShortInteger 
  109. keyAETextLineAscent                EQU        'ktas'                ; typeShortInteger 
  110. ; optional keywords for Pos2Offset 
  111. keyAELeftSide                    EQU        'klef'                ; type Boolean 
  112. ; optional keywords for kShowHideInputWindow 
  113. keyAEShowHideInputWindow        EQU        'shiw'                ; type Boolean 
  114. ; for PinRange  
  115. keyAEPinRange                    EQU        'pnrg'
  116. ; Desc type ... 
  117. typeComponentInstance            EQU        'cmpi'                ; server instance 
  118. typeTextRangeArray                EQU        'tray'                ; text range array 
  119. typeOffsetArray                    EQU        'ofay'                ; offset array 
  120. typeText                        EQU        typeChar            ; Plain text 
  121. typeTextRange                    EQU        'txrn'
  122.  
  123. ; Desc type constants 
  124. kTSMOutsideOfBody                EQU        1
  125. kTSMInsideOfBody                EQU        2
  126. kTSMInsideOfActiveInputArea        EQU        3
  127.  
  128. kNextBody                        EQU        1
  129. kPreviousBody                    EQU        2
  130.  
  131. ; Low level routines which are dispatched directly to the Component Manager 
  132. kCMGetScriptLangSupport            EQU        $0001                ; Component Manager call selector 1 
  133. kCMInitiateTextService            EQU        $0002                ; Component Manager call selector 2 
  134. kCMTerminateTextService            EQU        $0003                ; Component Manager call selector 3 
  135. kCMActivateTextService            EQU        $0004                ; Component Manager call selector 4 
  136. kCMDeactivateTextService        EQU        $0005                ; Component Manager call selector 5 
  137. kCMTextServiceEvent                EQU        $0006                ; Component Manager call selector 6 
  138. kCMGetTextServiceMenu            EQU        $0007                ; Component Manager call selector 7 
  139. kCMTextServiceMenuSelect        EQU        $0008                ; Component Manager call selector 8 
  140. kCMFixTextService                EQU        $0009                ; Component Manager call selector 9 
  141. kCMSetTextServiceCursor            EQU        $000A                ; Component Manager call selector 10 
  142. kCMHidePaletteWindows            EQU        $000B                ; Component Manager call selector 11 
  143.  
  144. ; typeTextRange         'txrn' 
  145. TextRange                 RECORD    0
  146. fStart                     ds.l   1        ; offset: $0 (0)
  147. fEnd                     ds.l   1        ; offset: $4 (4)
  148. fHiliteStyle             ds.w   1        ; offset: $8 (8)
  149. sizeof                     EQU *            ; size:   $A (10)
  150.                         ENDR
  151.  
  152. ; typedef struct TextRange     TextRange
  153. ; typedef TextRange         *TextRangePtr
  154. ; typedef TextRangePtr         *TextRangeHandle
  155. ; typeTextRangeArray    'txra' 
  156. TextRangeArray             RECORD    0
  157. fNumOfRanges             ds.w   1        ; offset: $0 (0)        ; specify the size of the fRange array 
  158. fRange                     ds     TextRange ; offset: $2 (2)        ; when fNumOfRanges > 1, the size of this array has to be calculated 
  159. sizeof                     EQU *            ; size:   $C (12)
  160.                         ENDR
  161.  
  162. ; typedef struct TextRangeArray  TextRangeArray
  163. ; typedef TextRangeArray     *TextRangeArrayPtr
  164. ; typedef TextRangeArrayPtr  *TextRangeArrayHandle
  165. ; typeOffsetArray        'offa' 
  166. OffsetArray             RECORD    0
  167. fNumOfOffsets             ds.w   1        ; offset: $0 (0)        ; specify the size of the fOffset array 
  168. fOffset                     ds.l   1        ; offset: $2 (2)        ; when fNumOfOffsets > 1, the size of this array has to be calculated 
  169. sizeof                     EQU *            ; size:   $6 (6)
  170.                         ENDR
  171.  
  172. ; typedef struct OffsetArray  OffsetArray
  173. ; typedef OffsetArray         *OffsetArrayPtr
  174. ; typedef OffsetArrayPtr     *OffsetArrayHandle
  175. ; typedef void                 *TSMDocumentID
  176. ; typedef OSType             InterfaceTypeList[1]
  177. ; Text Service Info List 
  178. TextServiceInfo         RECORD    0
  179. fComponent                 ds.l   1        ; offset: $0 (0)
  180. fItemName                 ds.l   64        ; offset: $4 (4)
  181. sizeof                     EQU *            ; size:   $104 (260)
  182.                         ENDR
  183.  
  184. ; typedef struct TextServiceInfo  TextServiceInfo
  185. ; typedef TextServiceInfo     *TextServiceInfoPtr
  186. TextServiceList         RECORD    0
  187. fTextServiceCount         ds.w   1        ; offset: $0 (0)        ; number of entries in the 'fServices' array 
  188. fServices                 ds     TextServiceInfo ; offset: $2 (2) ; Note: array of 'TextServiceInfo' records follows 
  189. sizeof                     EQU *            ; size:   $106 (262)
  190.                         ENDR
  191.  
  192. ; typedef struct TextServiceList  TextServiceList
  193. ; typedef TextServiceList     *TextServiceListPtr
  194. ; typedef TextServiceListPtr  *TextServiceListHandle
  195. ScriptLanguageRecord     RECORD    0
  196. fScript                     ds.w   1        ; offset: $0 (0)
  197. fLanguage                 ds.w   1        ; offset: $2 (2)
  198. sizeof                     EQU *            ; size:   $4 (4)
  199.                         ENDR
  200.  
  201. ; typedef struct ScriptLanguageRecord  ScriptLanguageRecord
  202. ScriptLanguageSupport     RECORD    0
  203. fScriptLanguageCount     ds.w   1        ; offset: $0 (0)        ; number of entries in the 'fScriptLanguageArray' array 
  204. fScriptLanguageArray     ds     ScriptLanguageRecord ; offset: $2 (2) ; Note: array of 'ScriptLanguageRecord' records follows 
  205. sizeof                     EQU *            ; size:   $6 (6)
  206.                         ENDR
  207.  
  208. ; typedef struct ScriptLanguageSupport  ScriptLanguageSupport
  209. ; typedef ScriptLanguageSupport  *ScriptLanguageSupportPtr
  210. ; typedef ScriptLanguageSupportPtr  *ScriptLanguageSupportHandle
  211. ;
  212. ; pascal OSErr NewTSMDocument(short numOfInterface, InterfaceTypeList supportedInterfaceTypes, TSMDocumentID *idocID, long refcon)
  213. ;
  214.     IF ¬ GENERATINGCFM THEN
  215.         Macro
  216.         _NewTSMDocument
  217.             moveq    #0,d0
  218.             dc.w     $AA54
  219.         EndM
  220.     ELSE
  221.         IMPORT_CFM_FUNCTION    NewTSMDocument
  222.     ENDIF
  223.  
  224. ;
  225. ; pascal OSErr DeleteTSMDocument(TSMDocumentID idocID)
  226. ;
  227.     IF ¬ GENERATINGCFM THEN
  228.         Macro
  229.         _DeleteTSMDocument
  230.             moveq    #1,d0
  231.             dc.w     $AA54
  232.         EndM
  233.     ELSE
  234.         IMPORT_CFM_FUNCTION    DeleteTSMDocument
  235.     ENDIF
  236.  
  237. ;
  238. ; pascal OSErr ActivateTSMDocument(TSMDocumentID idocID)
  239. ;
  240.     IF ¬ GENERATINGCFM THEN
  241.         Macro
  242.         _ActivateTSMDocument
  243.             moveq    #2,d0
  244.             dc.w     $AA54
  245.         EndM
  246.     ELSE
  247.         IMPORT_CFM_FUNCTION    ActivateTSMDocument
  248.     ENDIF
  249.  
  250. ;
  251. ; pascal OSErr DeactivateTSMDocument(TSMDocumentID idocID)
  252. ;
  253.     IF ¬ GENERATINGCFM THEN
  254.         Macro
  255.         _DeactivateTSMDocument
  256.             moveq    #3,d0
  257.             dc.w     $AA54
  258.         EndM
  259.     ELSE
  260.         IMPORT_CFM_FUNCTION    DeactivateTSMDocument
  261.     ENDIF
  262.  
  263. ;
  264. ; pascal Boolean TSMEvent(EventRecord *event)
  265. ;
  266.     IF ¬ GENERATINGCFM THEN
  267.         Macro
  268.         _TSMEvent
  269.             moveq    #4,d0
  270.             dc.w     $AA54
  271.         EndM
  272.     ELSE
  273.         IMPORT_CFM_FUNCTION    TSMEvent
  274.     ENDIF
  275.  
  276. ;
  277. ; pascal Boolean TSMMenuSelect(long menuResult)
  278. ;
  279.     IF ¬ GENERATINGCFM THEN
  280.         Macro
  281.         _TSMMenuSelect
  282.             moveq    #5,d0
  283.             dc.w     $AA54
  284.         EndM
  285.     ELSE
  286.         IMPORT_CFM_FUNCTION    TSMMenuSelect
  287.     ENDIF
  288.  
  289. ;
  290. ; pascal Boolean SetTSMCursor(Point mousePos)
  291. ;
  292.     IF ¬ GENERATINGCFM THEN
  293.         Macro
  294.         _SetTSMCursor
  295.             moveq    #6,d0
  296.             dc.w     $AA54
  297.         EndM
  298.     ELSE
  299.         IMPORT_CFM_FUNCTION    SetTSMCursor
  300.     ENDIF
  301.  
  302. ;
  303. ; pascal OSErr FixTSMDocument(TSMDocumentID idocID)
  304. ;
  305.     IF ¬ GENERATINGCFM THEN
  306.         Macro
  307.         _FixTSMDocument
  308.             moveq    #7,d0
  309.             dc.w     $AA54
  310.         EndM
  311.     ELSE
  312.         IMPORT_CFM_FUNCTION    FixTSMDocument
  313.     ENDIF
  314.  
  315. ;
  316. ; pascal OSErr GetServiceList(short numOfInterface, OSType *supportedInterfaceTypes, TextServiceListHandle *serviceInfo, long *seedValue)
  317. ;
  318.     IF ¬ GENERATINGCFM THEN
  319.         Macro
  320.         _GetServiceList
  321.             moveq    #8,d0
  322.             dc.w     $AA54
  323.         EndM
  324.     ELSE
  325.         IMPORT_CFM_FUNCTION    GetServiceList
  326.     ENDIF
  327.  
  328. ;
  329. ; pascal OSErr OpenTextService(TSMDocumentID idocID, Component aComponent, ComponentInstance *aComponentInstance)
  330. ;
  331.     IF ¬ GENERATINGCFM THEN
  332.         Macro
  333.         _OpenTextService
  334.             moveq    #9,d0
  335.             dc.w     $AA54
  336.         EndM
  337.     ELSE
  338.         IMPORT_CFM_FUNCTION    OpenTextService
  339.     ENDIF
  340.  
  341. ;
  342. ; pascal OSErr CloseTextService(TSMDocumentID idocID, ComponentInstance aComponentInstance)
  343. ;
  344.     IF ¬ GENERATINGCFM THEN
  345.         Macro
  346.         _CloseTextService
  347.             moveq    #10,d0
  348.             dc.w     $AA54
  349.         EndM
  350.     ELSE
  351.         IMPORT_CFM_FUNCTION    CloseTextService
  352.     ENDIF
  353.  
  354. ;
  355. ; pascal OSErr SendAEFromTSMComponent(const AppleEvent *theAppleEvent, AppleEvent *reply, AESendMode sendMode, AESendPriority sendPriority, long timeOutInTicks, AEIdleUPP idleProc, AEFilterUPP filterProc)
  356. ;
  357.     IF ¬ GENERATINGCFM THEN
  358.         Macro
  359.         _SendAEFromTSMComponent
  360.             moveq    #11,d0
  361.             dc.w     $AA54
  362.         EndM
  363.     ELSE
  364.         IMPORT_CFM_FUNCTION    SendAEFromTSMComponent
  365.     ENDIF
  366.  
  367. ;
  368. ; pascal OSErr InitTSMAwareApplication(void)
  369. ;
  370.     IF ¬ GENERATINGCFM THEN
  371.         Macro
  372.         _InitTSMAwareApplication
  373.             moveq    #20,d0
  374.             dc.w     $AA54
  375.         EndM
  376.     ELSE
  377.         IMPORT_CFM_FUNCTION    InitTSMAwareApplication
  378.     ENDIF
  379.  
  380. ;
  381. ; pascal OSErr CloseTSMAwareApplication(void)
  382. ;
  383.     IF ¬ GENERATINGCFM THEN
  384.         Macro
  385.         _CloseTSMAwareApplication
  386.             moveq    #21,d0
  387.             dc.w     $AA54
  388.         EndM
  389.     ELSE
  390.         IMPORT_CFM_FUNCTION    CloseTSMAwareApplication
  391.     ENDIF
  392.  
  393. ; Utilities 
  394. ;
  395. ; pascal OSErr SetDefaultInputMethod(Component ts, ScriptLanguageRecord *slRecordPtr)
  396. ;
  397.     IF ¬ GENERATINGCFM THEN
  398.         Macro
  399.         _SetDefaultInputMethod
  400.             moveq    #12,d0
  401.             dc.w     $AA54
  402.         EndM
  403.     ELSE
  404.         IMPORT_CFM_FUNCTION    SetDefaultInputMethod
  405.     ENDIF
  406.  
  407. ;
  408. ; pascal OSErr GetDefaultInputMethod(Component *ts, ScriptLanguageRecord *slRecordPtr)
  409. ;
  410.     IF ¬ GENERATINGCFM THEN
  411.         Macro
  412.         _GetDefaultInputMethod
  413.             moveq    #13,d0
  414.             dc.w     $AA54
  415.         EndM
  416.     ELSE
  417.         IMPORT_CFM_FUNCTION    GetDefaultInputMethod
  418.     ENDIF
  419.  
  420. ;
  421. ; pascal OSErr SetTextServiceLanguage(ScriptLanguageRecord *slRecordPtr)
  422. ;
  423.     IF ¬ GENERATINGCFM THEN
  424.         Macro
  425.         _SetTextServiceLanguage
  426.             moveq    #14,d0
  427.             dc.w     $AA54
  428.         EndM
  429.     ELSE
  430.         IMPORT_CFM_FUNCTION    SetTextServiceLanguage
  431.     ENDIF
  432.  
  433. ;
  434. ; pascal OSErr GetTextServiceLanguage(ScriptLanguageRecord *slRecordPtr)
  435. ;
  436.     IF ¬ GENERATINGCFM THEN
  437.         Macro
  438.         _GetTextServiceLanguage
  439.             moveq    #15,d0
  440.             dc.w     $AA54
  441.         EndM
  442.     ELSE
  443.         IMPORT_CFM_FUNCTION    GetTextServiceLanguage
  444.     ENDIF
  445.  
  446. ;
  447. ; pascal OSErr UseInputWindow(TSMDocumentID idocID, Boolean useWindow)
  448. ;
  449.     IF ¬ GENERATINGCFM THEN
  450.         Macro
  451.         _UseInputWindow
  452.             moveq    #16,d0
  453.             dc.w     $AA54
  454.         EndM
  455.     ELSE
  456.         IMPORT_CFM_FUNCTION    UseInputWindow
  457.     ENDIF
  458.  
  459. ;
  460. ; pascal OSErr NewServiceWindow(void *wStorage, const Rect *boundsRect, ConstStr255Param title, Boolean visible, short theProc, WindowPtr behind, Boolean goAwayFlag, ComponentInstance ts, WindowPtr *window)
  461. ;
  462.     IF ¬ GENERATINGCFM THEN
  463.         Macro
  464.         _NewServiceWindow
  465.             moveq    #17,d0
  466.             dc.w     $AA54
  467.         EndM
  468.     ELSE
  469.         IMPORT_CFM_FUNCTION    NewServiceWindow
  470.     ENDIF
  471.  
  472. ;
  473. ; pascal OSErr CloseServiceWindow(WindowPtr window)
  474. ;
  475.     IF ¬ GENERATINGCFM THEN
  476.         Macro
  477.         _CloseServiceWindow
  478.             moveq    #18,d0
  479.             dc.w     $AA54
  480.         EndM
  481.     ELSE
  482.         IMPORT_CFM_FUNCTION    CloseServiceWindow
  483.     ENDIF
  484.  
  485. ;
  486. ; pascal OSErr GetFrontServiceWindow(WindowPtr *window)
  487. ;
  488.     IF ¬ GENERATINGCFM THEN
  489.         Macro
  490.         _GetFrontServiceWindow
  491.             moveq    #19,d0
  492.             dc.w     $AA54
  493.         EndM
  494.     ELSE
  495.         IMPORT_CFM_FUNCTION    GetFrontServiceWindow
  496.     ENDIF
  497.  
  498. ;
  499. ; pascal short FindServiceWindow(Point thePoint, WindowPtr *theWindow)
  500. ;
  501.     IF ¬ GENERATINGCFM THEN
  502.         Macro
  503.         _FindServiceWindow
  504.             moveq    #23,d0
  505.             dc.w     $AA54
  506.         EndM
  507.     ELSE
  508.         IMPORT_CFM_FUNCTION    FindServiceWindow
  509.     ENDIF
  510.  
  511. ; Low level TSM routines 
  512. ;
  513. ; pascal ComponentResult GetScriptLanguageSupport(ComponentInstance ts, ScriptLanguageSupportHandle *scriptHdl)
  514. ;
  515.     IF ¬ GENERATINGCFM THEN
  516.         Macro
  517.         _GetScriptLanguageSupport
  518.             dc.w     $2F3C
  519.             dc.w     $0004
  520.             dc.w     $0001
  521.             moveq    #0,d0
  522.             dc.w     $A82A
  523.         EndM
  524.     ELSE
  525.         IMPORT_CFM_FUNCTION    GetScriptLanguageSupport
  526.     ENDIF
  527.  
  528. ;
  529. ; pascal ComponentResult InitiateTextService(ComponentInstance ts)
  530. ;
  531.     IF ¬ GENERATINGCFM THEN
  532.         Macro
  533.         _InitiateTextService
  534.             dc.w     $2F3C
  535.             dc.w     $0000
  536.             dc.w     $0002
  537.             moveq    #0,d0
  538.             dc.w     $A82A
  539.         EndM
  540.     ELSE
  541.         IMPORT_CFM_FUNCTION    InitiateTextService
  542.     ENDIF
  543.  
  544. ;
  545. ; pascal ComponentResult TerminateTextService(ComponentInstance ts)
  546. ;
  547.     IF ¬ GENERATINGCFM THEN
  548.         Macro
  549.         _TerminateTextService
  550.             dc.w     $2F3C
  551.             dc.w     $0000
  552.             dc.w     $0003
  553.             moveq    #0,d0
  554.             dc.w     $A82A
  555.         EndM
  556.     ELSE
  557.         IMPORT_CFM_FUNCTION    TerminateTextService
  558.     ENDIF
  559.  
  560. ;
  561. ; pascal ComponentResult ActivateTextService(ComponentInstance ts)
  562. ;
  563.     IF ¬ GENERATINGCFM THEN
  564.         Macro
  565.         _ActivateTextService
  566.             dc.w     $2F3C
  567.             dc.w     $0000
  568.             dc.w     $0004
  569.             moveq    #0,d0
  570.             dc.w     $A82A
  571.         EndM
  572.     ELSE
  573.         IMPORT_CFM_FUNCTION    ActivateTextService
  574.     ENDIF
  575.  
  576. ;
  577. ; pascal ComponentResult DeactivateTextService(ComponentInstance ts)
  578. ;
  579.     IF ¬ GENERATINGCFM THEN
  580.         Macro
  581.         _DeactivateTextService
  582.             dc.w     $2F3C
  583.             dc.w     $0000
  584.             dc.w     $0005
  585.             moveq    #0,d0
  586.             dc.w     $A82A
  587.         EndM
  588.     ELSE
  589.         IMPORT_CFM_FUNCTION    DeactivateTextService
  590.     ENDIF
  591.  
  592. ;
  593. ; pascal ComponentResult TextServiceEvent(ComponentInstance ts, short numOfEvents, EventRecord *event)
  594. ;
  595.     IF ¬ GENERATINGCFM THEN
  596.         Macro
  597.         _TextServiceEvent
  598.             dc.w     $2F3C
  599.             dc.w     $0006
  600.             dc.w     $0006
  601.             moveq    #0,d0
  602.             dc.w     $A82A
  603.         EndM
  604.     ELSE
  605.         IMPORT_CFM_FUNCTION    TextServiceEvent
  606.     ENDIF
  607.  
  608. ;
  609. ; pascal ComponentResult GetTextServiceMenu(ComponentInstance ts, MenuHandle *serviceMenu)
  610. ;
  611.     IF ¬ GENERATINGCFM THEN
  612.         Macro
  613.         _GetTextServiceMenu
  614.             dc.w     $2F3C
  615.             dc.w     $0004
  616.             dc.w     $0007
  617.             moveq    #0,d0
  618.             dc.w     $A82A
  619.         EndM
  620.     ELSE
  621.         IMPORT_CFM_FUNCTION    GetTextServiceMenu
  622.     ENDIF
  623.  
  624. ;
  625. ; pascal ComponentResult TextServiceMenuSelect(ComponentInstance ts, MenuHandle serviceMenu, short item)
  626. ;
  627.     IF ¬ GENERATINGCFM THEN
  628.         Macro
  629.         _TextServiceMenuSelect
  630.             dc.w     $2F3C
  631.             dc.w     $0006
  632.             dc.w     $0008
  633.             moveq    #0,d0
  634.             dc.w     $A82A
  635.         EndM
  636.     ELSE
  637.         IMPORT_CFM_FUNCTION    TextServiceMenuSelect
  638.     ENDIF
  639.  
  640. ;
  641. ; pascal ComponentResult FixTextService(ComponentInstance ts)
  642. ;
  643.     IF ¬ GENERATINGCFM THEN
  644.         Macro
  645.         _FixTextService
  646.             dc.w     $2F3C
  647.             dc.w     $0000
  648.             dc.w     $0009
  649.             moveq    #0,d0
  650.             dc.w     $A82A
  651.         EndM
  652.     ELSE
  653.         IMPORT_CFM_FUNCTION    FixTextService
  654.     ENDIF
  655.  
  656. ;
  657. ; pascal ComponentResult SetTextServiceCursor(ComponentInstance ts, Point mousePos)
  658. ;
  659.     IF ¬ GENERATINGCFM THEN
  660.         Macro
  661.         _SetTextServiceCursor
  662.             dc.w     $2F3C
  663.             dc.w     $0004
  664.             dc.w     $000A
  665.             moveq    #0,d0
  666.             dc.w     $A82A
  667.         EndM
  668.     ELSE
  669.         IMPORT_CFM_FUNCTION    SetTextServiceCursor
  670.     ENDIF
  671.  
  672. ;
  673. ; pascal ComponentResult HidePaletteWindows(ComponentInstance ts)
  674. ;
  675.     IF ¬ GENERATINGCFM THEN
  676.         Macro
  677.         _HidePaletteWindows
  678.             dc.w     $2F3C
  679.             dc.w     $0000
  680.             dc.w     $000B
  681.             moveq    #0,d0
  682.             dc.w     $A82A
  683.         EndM
  684.     ELSE
  685.         IMPORT_CFM_FUNCTION    HidePaletteWindows
  686.     ENDIF
  687.  
  688.     ENDIF ; __TEXTSERVICES__
  689.